import { format } from 'date-fns'
import { toDate } from '../../utils/util'

export default {
  name: 'format',
  filter (time, gs = 'mm/dd/yyyy') {
    if (!time) return ''
    return format(toDate(time), gs)
  }
}
